package com.ruoyi.project.device.curing.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.device.curing.mapper.BasDeviceCuringMapper;
import com.ruoyi.project.device.curing.domain.BasDeviceCuring;
import com.ruoyi.project.device.curing.service.IBasDeviceCuringService;
import com.ruoyi.common.core.text.Convert;

/**
 * 保养记录Service业务层处理
 * 
 * @author wld
 * @date 2023-04-04
 */
@Service
public class BasDeviceCuringServiceImpl implements IBasDeviceCuringService 
{
    @Autowired
    private BasDeviceCuringMapper basDeviceCuringMapper;

    /**
     * 查询保养记录
     * 
     * @param deviceId 保养记录主键
     * @return 保养记录
     */
    @Override
    public BasDeviceCuring selectBasDeviceCuringByDeviceId(String deviceId)
    {
        return basDeviceCuringMapper.selectBasDeviceCuringByDeviceId(deviceId);
    }

    /**
     * 查询保养记录列表
     * 
     * @param basDeviceCuring 保养记录
     * @return 保养记录
     */
    @Override
    public List<BasDeviceCuring> selectBasDeviceCuringList(BasDeviceCuring basDeviceCuring)
    {
        return basDeviceCuringMapper.selectBasDeviceCuringList(basDeviceCuring);
    }

    /**
     * 新增保养记录
     * 
     * @param basDeviceCuring 保养记录
     * @return 结果
     */
    @Override
    public int insertBasDeviceCuring(BasDeviceCuring basDeviceCuring)
    {
        return basDeviceCuringMapper.insertBasDeviceCuring(basDeviceCuring);
    }

    /**
     * 修改保养记录
     * 
     * @param basDeviceCuring 保养记录
     * @return 结果
     */
    @Override
    public int updateBasDeviceCuring(BasDeviceCuring basDeviceCuring)
    {
        return basDeviceCuringMapper.updateBasDeviceCuring(basDeviceCuring);
    }

    /**
     * 批量删除保养记录
     * 
     * @param deviceIds 需要删除的保养记录主键
     * @return 结果
     */
    @Override
    public int deleteBasDeviceCuringByDeviceIds(String deviceIds)
    {
        return basDeviceCuringMapper.deleteBasDeviceCuringByDeviceIds(Convert.toStrArray(deviceIds));
    }

    /**
     * 删除保养记录信息
     * 
     * @param deviceId 保养记录主键
     * @return 结果
     */
    @Override
    public int deleteBasDeviceCuringByDeviceId(String deviceId)
    {
        return basDeviceCuringMapper.deleteBasDeviceCuringByDeviceId(deviceId);
    }
}
